Many web application systems employ standard interfaces such as Representational State Transfer (REST) interfaces. Interfaces such as REST interfaces typically include programming application interfaces (APIs). One popular method of building application systems is to employ a micro-services architecture. In such an architecture, an API that aggregates the interfaces of multiple other services needed for a full system is created. For example, a gateway API allows a caller to call a single interface with a transaction that is orchestrated into calls to registered services, both internal and external. One example is the creation of a service that takes an input document, performs a transformation on the document, extract some cognitive annotations or text from the original document and then store the results in a persisted service. Other transactions may enable a user to retrieve the original document and annotations, add comments or notes to the document and annotations and store these changes. Each of these action might be performed by different services, thus the “orchestration” of the transaction. The gateway API receives the original transaction request and then calls multiple other services on behalf of the client.
As the Inventors herein have realized, one issue that has arisen with respect to API services and front-end servers is the handling and testing of error conditions that might occur when calling external services. For example, an external service may be offline when the API attempts to call the service.
Provided is a validation framework for modelling all the possible failures that might occur when an orchestrated transaction calls external services to ensure that error handling and reporting is robust and well designed. The disclosed techniques ensure that no changes are necessary to either the code making a call or the services that might be called. The techniques are not limited to web servers and REST APIs as they may be used to test and validate any kind of system that employs well defined APIs.
The claimed subject matter, or “validation framework” may be added to an existing API or created as a new module that acts as a proxy server in a non-micro service type of system. As should be clear to those with skill in the relevant arts, although described with respect to a gateway-API service, the claimed subject matter is equally applicable to other systems that process orchestrated transactions.
The validation framework provides the ability to test a set of system APIs with the injection of error data (payloads and return codes) without the need for any code changes to either the client calling the system or the server code that comprises the system.
Provided are techniques for managing communication in a distributed computing system, comprising retrieving at a verification framework, return codes corresponding to a plurality of application programming interfaces (APIs), each API of the plurality of APIs corresponding to a corresponding service provider of a plurality service providers to generate a return code list; generating, by the verification framework, an erroneous call for a particular API of the plurality of APIs; a corresponding service provider of the plurality of service providers; transmitting the erroneous call to the particular API of the corresponding service provider; receiving, by the verification framework, a response from the corresponding service provider in response to the erroneous call; and verifying, by the verification framework, whether or not the response is a response that is expected based upon the return code list.
In accordance with the claimed subject matter, the functionality or capability of computing systems is improved by simplifying and automating the testing of components. Additionally, the functionality or capability of computing systems is improved by preventing a team of software engineers from spending time and utilizing computing resources (e.g., processing resources) attempting to identify and understand the errors that typically occur during development. By reducing the amount of computing resources being utilized by software developers from identifying and understanding such errors, computing resources are more efficiently utilized. The technical solution provided by the disclosed technology cannot be performed in the human mind or by a human using a pen and paper. That is, the technical solution provided by the claimed subject matter could not be accomplished in the human mind or by a human using a pen and paper in any reasonable amount of time and with any reasonable expectation of accuracy without the use of a computer.
This summary is not intended as a comprehensive description of the claimed subject matter but, rather, is intended to provide a brief overview of some of the functionality associated therewith. Other systems, methods, functionality, features and advantages of the claimed subject matter will be or will become apparent to one with skill in the art upon examination of the following figures and detailed description.